home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Source Code
/
C
/
Applications
/
MacPerl 5.0.3
/
Preinstalled MacPerl (FAT)
/
lib
/
Sys
/
Hostname.pm
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-03-20
|
361 b
|
26 lines
|
[
TEXT/McPL
]
# by David Sundstrom sunds@asictest.sc.ti.com
# Texas Instruments
package Sys::Hostname;
use Carp;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(hostname);
#
# Try every conceivable way to get hostname.
#
sub hostname {
# method 1 - we already know it
return $host if defined $host;
chop($host = `hostname`);
$host;
}
1;